package com.rran.study.designpattern.behavioral.command.command;

import com.rran.study.designpattern.behavioral.command.receiver.Cook;
import com.rran.study.designpattern.behavioral.command.receiver.Receiver;

/**
 * 需要食物的命令
 */
public class NeedCookCommand implements Command {
    private final Receiver receiver;

    public NeedCookCommand() {
        this.receiver = new Cook();
    }

    @Override
    public void execute() {
        receiver.doAction();
    }
}
